package com.sg.controller.bff;

import com.sg.service.biz.bff.BaseService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "Base", tags = {"Base"})
@RestController
// @RequestMapping("/oms/base/")
public class BaseController {

    @Autowired
    BaseService baseService;

    /**
     * B1-2查询空间应用详情（公共）
     * gen by moon at 12/16/2022, 9:12:23 PM
     */
    @PostMapping("/oms/base/querySpaceAppDetailCom")
    @ApiOperation(value = "B1-2查询空间应用详情（公共）", response = OkrResult.class)
    public OkrResult<BffQuerySpaceAppDetailComRespDto> querySpaceAppDetailCom(@RequestBody(required = false) @Validated BffQuerySpaceAppDetailComReqDto reqDTO) {
        return OkrResult.success(baseService.querySpaceAppDetailCom(reqDTO));
    }


    /**
     * B1-2查场景列表（公共）
     */
    @PostMapping("/oms/platform/base/querySceneListCom")
    @ApiOperation(value = "B1-2查场景列表（公共）", response = OkrResult.class)
    public OkrResult<BffQuerySceneListComRespDto> querySceneListCom(@RequestBody(required = false) @Validated BffQuerySceneListComReqDto reqDTO) {
        return OkrResult.success(baseService.querySceneListCom(reqDTO));
    }


    /**
     * B1-2修改空间（管理）
     * gen by moon at 8/10/2022, 3:31:35 AM
     */
    @PostMapping("/oms/mgt/base/updateSpace")
    @ApiOperation(value = "B1-2修改空间（管理）", response = OkrResult.class)
    public OkrResult<BffUpdateSpaceRespDto> updateSpace(@RequestBody(required = false) @Validated BffUpdateSpaceReqDto reqDTO) {
        return OkrResult.success(baseService.updateSpace(reqDTO));
    }

    /**
     * B1-2查询空间详情
     * gen by moon at 8/10/2022, 3:33:14 AM
     */
    @PostMapping("/oms/base/querySpaceDetail")
    @ApiOperation(value = "B1-2查询空间详情", response = OkrResult.class)
    public OkrResult<BffQuerySpaceDetailRespDto> querySpaceDetail(@RequestBody(required = false) @Validated BffQuerySpaceDetailReqDto reqDTO) {
        return OkrResult.success(baseService.querySpaceDetail(reqDTO));
    }


    /**
     * B1-2修改空间应用（管理）
     * gen by moon at 8/10/2022, 3:33:18 AM
     */
    @PostMapping("/oms/mgt/base/updateSpaceApp")
    @ApiOperation(value = "B1-2修改空间应用（管理）", response = OkrResult.class)
    public OkrResult<BffUpdateSpaceAppRespDto> updateSpaceApp(@RequestBody(required = false) @Validated BffUpdateSpaceAppReqDto reqDTO) {
        return OkrResult.success(baseService.updateSpaceApp(reqDTO));
    }


    /**
     * B1-2查询空间应用详情
     * gen by moon at 8/10/2022, 3:30:10 AM
     */
    @PostMapping("/oms/base/querySpaceAppDetail")
    @ApiOperation(value = "B1-2查询空间应用详情", response = OkrResult.class)
    public OkrResult<BffQuerySpaceAppDetailRespDto> querySpaceAppDetail(@RequestBody(required = false) @Validated BffQuerySpaceAppDetailReqDto reqDTO) {
        return OkrResult.success(baseService.querySpaceAppDetail(reqDTO));
    }


    /**
     * B1-2查联盟应用列表（边界）
     */
    @PostMapping("/oms/platform/base/queryAppListBorder")
    @ApiOperation(value = "B1-2查联盟应用列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryAppListBorderRespDto> queryAppListBorder(@RequestBody(required = false) @Validated BffQueryAppListBorderReqDto reqDTO) {
        return OkrResult.success(baseService.queryAppListBorder(reqDTO));
    }


    /**
     * 11111B1-2查应用短信配置详情
     */
    @PostMapping("/oms/platform/base/queryAppMessageSetDetail")
    @ApiOperation(value = "11111B1-2查应用短信配置详情", response = OkrResult.class)
    public OkrResult<BffQueryAppMessageSetDetailRespDto> queryAppMessageSetDetail(@RequestBody(required = false) @Validated BffQueryAppMessageSetDetailReqDto reqDTO) {
        return OkrResult.success(baseService.queryAppMessageSetDetail(reqDTO));
    }

    /**
     * 111111B1-2修改应用短信配置
     */
    @PostMapping("/oms/platform/base/updateAppMessageSet")
    @ApiOperation(value = "111111B1-2修改应用短信配置", response = OkrResult.class)
    public OkrResult<BffUpdateAppMessageSetRespDto> updateAppMessageSet(@RequestBody(required = false) @Validated BffUpdateAppMessageSetReqDto reqDTO) {
        return OkrResult.success(baseService.updateAppMessageSet(reqDTO));
    }
}
